import request from '@/router/axios';
//质检方案分页查询
export const getPageList = (current, size, params) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/selectPageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//保存质检方案
export const saveQualityTestingProgramme = (row) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/saveQualityTestingProgramme',
    method: 'post',
    data: row
  })
}
//启动任务
export const startJob = (row) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/startJob',
    method: 'post',
    data: row
  })
}
//停止定时任务
export const stopJob = (row) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/stopJob',
    method: 'post',
    data: row
  })
}
//触发定时任务
export const trigger = (row) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/trigger',
    method: 'post',
    data: row
  })
}
//根据ID获取详情
export const getDetailById = (id) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getDetailById',
    method: 'get',
    params: {
      id,
    }
  })
}
//根据主键集合批量删除
export const removeQualityTestingProgrammes = (ids) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/removeQualityTestingProgrammes',
    method: 'post',
    params: {
      ids,
    }
  })
}
//根据主键删除
export const removeQualityTestingProgramme = (id) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/removeQualityTestingProgramme',
    method: 'post',
    params: {
      id,
    }
  })
}
//修改质检方案
export const updateQualityTestingProgramme = (row) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/updateQualityTestingProgramme',
    method: 'post',
    data: row
  })
}
//分页获取统计结果表的记录
export const getTJPageList = (current, size, params) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getTJPageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//分页获取记录表的记录
export const getJLPageList = (current, size, params) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getJLPageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//设为例外
export const setAsException = (jlStr) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/setAsException',
    method: 'post',
    params: {
      jlStr
    }
  })
}
//分页获取例外表的记录
export const getLWPageList = (current, size, params) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getLWPageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//分页获取统计例外表的记录
export const getLWStatisticPageList = (current, size, params) => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getLWStatisticPageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
//获取模型和方案树
export const getModelProgrammeTree = () => {
  return request({
    url: '/api/data-quality/qualityTestingProgramme/getModelProgrammeTree',
    method: 'get',
  })
}
